package com.wz.two;

import com.wz.two.Decorator;

/**
 * @description: 具体装饰：实现抽象装饰者角色，负责对具体构件添加额外功能。
 * @author: WZ
 * @create: 2019-02-11 09:53
 **/

public class ManDecoratorA extends Decorator {

    @Override
    public void eat() {
        super.eat();
        reEat();
        System.out.println("ManDecoratorA类");
    }

    private void reEat(){
        System.out.println("再吃一顿饭");
    }

    public static class ManDecoratorB extends Decorator{
        @Override
        public void eat() {
            super.eat();
            System.out.println("===============");
            System.out.println("ManDecoratorB类");
        }
    }
}
